< previous page page_36 next page >

Page 36
Compile on Demand
Visual Basic has an option to defer the compilation of a program until you actually get to that point at runtime. This can help your program get started quicker when you click the Run button. However, it also means that youll wait until runtime to get any errors that may otherwise be caught by the compiler.
I prefer to leave this option unchecked, because I think you should always perform a full compile on your projects. For some large projects, this means youll need to wait longer the first time the project is compiled, but subsequent compiles will be very quick.
Environment Tab
The Environment tab is where youll find options for Visual Basic startup, your project startup, and template information.
When a Program Starts
This option should be set to either Save Changes or Prompt to Save Changes. When your program starts after compiling, youll be prompted to save any changes made before running it. This ensures that if a fatal error occurs in your program, any changes you have made prior to the fatal error will be saved.
Creating a New Project
The first step in building a standard Visual Basic application is to create the user interface. If you design the user interface first, youll find that writing the code to go along with the user interface goes much smoother.
When you start up the Visual Basic IDE, youll be asked to select the type of project you want to develop. Lets begin with a standard EXE application. Once youve selected this option, you now have a blank form ready to accept some controls.
A Sample Program
In this chapter, youll start putting together an employee information form. Follow along with the exercise in this chapter to learn how to put together the user interface for a Visual Basic application. Figure 2.3 is an example of what this screen looks like.

 
< previous page page_36 next page >

If you like this book, buy it!